package com.yfj.entity;

import java.util.List;


public class Course {
	private long id;
	private String name;
	private String college;
	private String major;
	private String property;
	private float credit;
	private long teacherId;
	private String teacherName;
	private String state;
	//限选人数
	private int restrictedNum;
	//已选人数
	private int selectedNum;
	//周期
	private String cycle;
	//该课下学生
	private List<Student> studentList;
	//三位一体
	private List<Trinity> trinityList;
	
	
	public Course() {
		super();
	}
	
	//用于addCourse.html前台向后台传参
	public Course(long id, String name, String college, String major, String property, float credit,
			long teacherId, String state, int restrictedNum, String cycle) {
		super();
		this.id = id;
		this.name = name;
		this.college = college;
		this.major = major;
		this.property = property;
		this.credit = credit;
		this.teacherId = teacherId;
		this.state=state;
		this.restrictedNum = restrictedNum;
		this.cycle = cycle;
	}
	
	//学生页面,allCourse新加教师姓名
	public Course(long id, String name, String college, String major, String property, float credit,
			long teacherId, String teacherName, String state, int restrictedNum, String cycle) {
		super();
		this.id = id;
		this.name = name;
		this.college = college;
		this.major = major;
		this.property = property;
		this.credit = credit;
		this.teacherId = teacherId;
		this.teacherName=teacherName;
		this.state=state;
		this.restrictedNum = restrictedNum;
		this.cycle = cycle;
	}


	public Course(long id, String name, String property, float credit, long teacherId,String teacherName,String state, int restrictedNum,
			int selectedNum, String cycle, List<Student> studentList, List<Trinity> trinityList, String college,
			String major) {
		super();
		this.id = id;
		this.name = name;
		this.property = property;
		this.credit = credit;
		this.teacherId = teacherId;
		this.teacherName=teacherName;
		this.state=state;
		this.restrictedNum = restrictedNum;
		this.selectedNum = selectedNum;
		this.cycle = cycle;
		this.studentList = studentList;
		this.trinityList = trinityList;
		this.college = college;
		this.major = major;
	}
	

	public long getId() {
		return id;
	}


	public void setId(long id) {
		this.id = id;
	}


	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}


	public String getCollege() {
		return college;
	}


	public void setCollege(String college) {
		this.college = college;
	}


	public String getMajor() {
		return major;
	}


	public void setMajor(String major) {
		this.major = major;
	}


	public String getProperty() {
		return property;
	}


	public void setProperty(String property) {
		this.property = property;
	}


	public float getCredit() {
		return credit;
	}


	public void setCredit(float credit) {
		this.credit = credit;
	}


	public long getTeacherId() {
		return teacherId;
	}


	public void setTeacherId(long teacherId) {
		this.teacherId = teacherId;
	}
	
	
	
	public String getTeacherName() {
		return teacherName;
	}

	public void setTeacherName(String teacherName) {
		this.teacherName = teacherName;
	}

	public String getState() {
		return state;
	}


	public void setState(String state) {
		this.state = state;
	}


	public int getRestrictedNum() {
		return restrictedNum;
	}


	public void setRestrictedNum(int restrictedNum) {
		this.restrictedNum = restrictedNum;
	}


	public int getSelectedNum() {
		return selectedNum;
	}


	public void setSelectedNum(int selectedNum) {
		this.selectedNum = selectedNum;
	}


	public String getCycle() {
		return cycle;
	}


	public void setCycle(String cycle) {
		this.cycle = cycle;
	}


	public List<Student> getStudentList() {
		return studentList;
	}


	public void setStudentList(List<Student> studentList) {
		this.studentList = studentList;
	}


	public List<Trinity> getTrinityList() {
		return trinityList;
	}


	public void setTrinityList(List<Trinity> trinityList) {
		this.trinityList = trinityList;
	}

	

	@Override
	public String toString() {
		return "Course [id=" + id + ", name=" + name + ", college=" + college + ", major=" + major
				+ ", property=" + property + ", credit=" + credit + ", teacherId=" + teacherId + ", teacherName=" + teacherName+ ", state=" + state + ", restrictedNum="
				+ restrictedNum  + ", cycle=" + cycle + "]";
	}

	
	public void say() {
		
		System.out.println(this.toString());
		
//		for (Student student : studentList) {
//			System.out.println("/t"+student.toString());
//		}
		
		for (Trinity trinity : trinityList) {
			System.out.println("\t"+trinity.toString());
		}
	}
	
	
}
